package com.honey.compilation.sql;


/**
 * SQL 92 的关键子
 * @author Administrator
 *
 */
public enum SqlKeyWord {
	ABSOLUTE( "ABSOLUTE" , true ),
	ACTION( "ACTION" , true ),
	ADD( "ADD" , true ),
	ALL( "ALL" , true ),
	ALLOCATE( "ALLOCATE" , true ),
	ALTER( "ALTER" , true ),
	AND( "AND" , true ),
	ANY( "ANY" , true ),
	ARE( "ARE" , true ),
	AS( "AS" , true ),
	ASC( "ASC" , true ),
	ASSERTION( "ASSERTION" , true ),
	AT( "AT" , true ),
	AUTHORIZATION( "AUTHORIZATION" , true ),
	AVG( "AVG" , true ),
	BEGIN( "BEGIN" , true ),
	BETWEEN( "BETWEEN" , true ),
	BIT( "BIT" , true ),
	BIT_LENGTH( "BIT_LENGTH" , true ),
	BOTH( "BOTH" , true ),
	BY( "BY" , true ),
	CASCADE( "CASCADE" , true ),
	CASCADED( "CASCADED" , true ),
	CASE( "CASE" , true ),
	CAST( "CAST" , true ),
	CATALOG( "CATALOG" , true ),
	CHAR( "CHAR" , true ),
	CHARACTER( "CHARACTER" , true ),
	CHARACTER_LENGTH( "CHARACTER_LENGTH" , true ),
	CHAR_LENGTH( "CHAR_LENGTH" , true ),
	CHECK( "CHECK" , true ),
	CLOSE( "CLOSE" , true ),
	COALESCE( "COALESCE" , true ),
	COLLATE( "COLLATE" , true ),
	COLLATION( "COLLATION" , true ),
	COLUMN( "COLUMN" , true ),
	COMMIT( "COMMIT" , true ),
	CONNECT( "CONNECT" , true ),
	CONNECTION( "CONNECTION" , true ),
	CONSTRAINT( "CONSTRAINT" , true ),
	CONSTRAINTS( "CONSTRAINTS" , true ),
	CONTINUE( "CONTINUE" , true ),
	CONVERT( "CONVERT" , true ),
	CORRESPONDING( "CORRESPONDING" , true ),
	COUNT( "COUNT" , true ),
	CREATE( "CREATE" , true ),
	CROSS( "CROSS" , true ),
	CURRENT( "CURRENT" , true ),
	CURRENT_DATE( "CURRENT_DATE" , true ),
	CURRENT_TIME( "CURRENT_TIME" , true ),
	CURRENT_TIMESTAMP( "CURRENT_TIMESTAMP" , true ),
	CURRENT_USER( "CURRENT_USER" , true ),
	CURSOR( "CURSOR" , true ),
	DATE( "DATE" , true ),
	DAY( "DAY" , true ),
	DEALLOCATE( "DEALLOCATE" , true ),
	DEC( "DEC" , true ),
	DECIMAL( "DECIMAL" , true ),
	DECLARE( "DECLARE" , true ),
	DEFAULT( "DEFAULT" , true ),
	DEFERRABLE( "DEFERRABLE" , true ),
	DEFERRED( "DEFERRED" , true ),
	DELETE( "DELETE" , true ),
	DESC( "DESC" , true ),
	DESCRIBE( "DESCRIBE" , true ),
	DESCRIPTOR( "DESCRIPTOR" , true ),
	DIAGNOSTICS( "DIAGNOSTICS" , true ),
	DISCONNECT( "DISCONNECT" , true ),
	DISTINCT( "DISTINCT" , true ),
	DOMAIN( "DOMAIN" , true ),
	DOUBLE( "DOUBLE" , true ),
	DROP( "DROP" , true ),
	ELSE( "ELSE" , true ),
	END( "END" , true ),
	ESCAPE( "ESCAPE" , true ),
	EXCEPT( "EXCEPT" , true ),
	EXCEPTION( "EXCEPTION" , true ),
	EXEC( "EXEC" , true ),
	EXECUTE( "EXECUTE" , true ),
	EXISTS( "EXISTS" , true ),
	EXTERNAL( "EXTERNAL" , true ),
	EXTRACT( "EXTRACT" , true ),
	FALSE( "FALSE" , true ),
	FETCH( "FETCH" , true ),
	FIRST( "FIRST" , true ),
	FLOAT( "FLOAT" , true ),
	FOR( "FOR" , true ),
	FOREIGN( "FOREIGN" , true ),
	FOUND( "FOUND" , true ),
	FROM( "FROM" , true ),
	FULL( "FULL" , true ),
	GET( "GET" , true ),
	GLOBAL( "GLOBAL" , true ),
	GO( "GO" , true ),
	GOTO( "GOTO" , true ),
	GRANT( "GRANT" , true ),
	GROUP( "GROUP" , true ),
	HAVING( "HAVING" , true ),
	HOUR( "HOUR" , true ),
	IDENTITY( "IDENTITY" , true ),
	IMMEDIATE( "IMMEDIATE" , true ),
	IN( "IN" , true ),
	INDICATOR( "INDICATOR" , true ),
	INITIALLY( "INITIALLY" , true ),
	INNER( "INNER" , true ),
	INPUT( "INPUT" , true ),
	INSENSITIVE( "INSENSITIVE" , true ),
	INSERT( "INSERT" , true ),
	INT( "INT" , true ),
	INTEGER( "INTEGER" , true ),
	INTERSECT( "INTERSECT" , true ),
	INTERVAL( "INTERVAL" , true ),
	INTO( "INTO" , true ),
	IS( "IS" , true ),
	ISOLATION( "ISOLATION" , true ),
	JOIN( "JOIN" , true ),
	KEY( "KEY" , true ),
	LANGUAGE( "LANGUAGE" , true ),
	LAST( "LAST" , true ),
	LEADING( "LEADING" , true ),
	LEFT( "LEFT" , true ),
	LEVEL( "LEVEL" , true ),
	LIKE( "LIKE" , true ),
	LOCAL( "LOCAL" , true ),
	LOWER( "LOWER" , true ),
	MATCH( "MATCH" , true ),
	MAX( "MAX" , true ),
	MIN( "MIN" , true ),
	MINUTE( "MINUTE" , true ),
	MODULE( "MODULE" , true ),
	MONTH( "MONTH" , true ),
	NAMES( "NAMES" , true ),
	NATIONAL( "NATIONAL" , true ),
	NATURAL( "NATURAL" , true ),
	NCHAR( "NCHAR" , true ),
	NEXT( "NEXT" , true ),
	NO( "NO" , true ),
	NOT( "NOT" , true ),
	NULL( "NULL" , true ),
	NULLIF( "NULLIF" , true ),
	NUMERIC( "NUMERIC" , true ),
	OCTET_LENGTH( "OCTET_LENGTH" , true ),
	OF( "OF" , true ),
	ON( "ON" , true ),
	ONLY( "ONLY" , true ),
	OPEN( "OPEN" , true ),
	OPTION( "OPTION" , true ),
	OR( "OR" , true ),
	ORDER( "ORDER" , true ),
	OUTER( "OUTER" , true ),
	OUTPUT( "OUTPUT" , true ),
	OVERLAPS( "OVERLAPS" , true ),
	PAD( "PAD" , true ),
	PARTIAL( "PARTIAL" , true ),
	POSITION( "POSITION" , true ),
	PRECISION( "PRECISION" , true ),
	PREPARE( "PREPARE" , true ),
	PRESERVE( "PRESERVE" , true ),
	PRIMARY( "PRIMARY" , true ),
	PRIOR( "PRIOR" , true ),
	PRIVILEGES( "PRIVILEGES" , true ),
	PROCEDURE( "PROCEDURE" , true ),
	PUBLIC( "PUBLIC" , true ),
	READ( "READ" , true ),
	REAL( "REAL" , true ),
	REFERENCES( "REFERENCES" , true ),
	RELATIVE( "RELATIVE" , true ),
	RESTRICT( "RESTRICT" , true ),
	REVOKE( "REVOKE" , true ),
	RIGHT( "RIGHT" , true ),
	ROLLBACK( "ROLLBACK" , true ),
	ROWS( "ROWS" , true ),
	SCHEMA( "SCHEMA" , true ),
	SCROLL( "SCROLL" , true ),
	SECOND( "SECOND" , true ),
	SECTION( "SECTION" , true ),
	SELECT( "SELECT" , true ),
	SESSION( "SESSION" , true ),
	SESSION_USER( "SESSION_USER" , true ),
	SET( "SET" , true ),
	SIZE( "SIZE" , true ),
	SMALLINT( "SMALLINT" , true ),
	SOME( "SOME" , true ),
	SPACE( "SPACE" , true ),
	SQL( "SQL" , true ),
	SQLCODE( "SQLCODE" , true ),
	SQLERROR( "SQLERROR" , true ),
	SQLSTATE( "SQLSTATE" , true ),
	SUBSTRING( "SUBSTRING" , true ),
	SUM( "SUM" , true ),
	SYSTEM_USER( "SYSTEM_USER" , true ),
	TABLE( "TABLE" , true ),
	TEMPORARY( "TEMPORARY" , true ),
	THEN( "THEN" , true ),
	TIME( "TIME" , true ),
	TIMESTAMP( "TIMESTAMP" , true ),
	TIMEZONE_HOUR( "TIMEZONE_HOUR" , true ),
	TIMEZONE_MINUTE( "TIMEZONE_MINUTE" , true ),
	TO( "TO" , true ),
	TRAILING( "TRAILING" , true ),
	TRANSACTION( "TRANSACTION" , true ),
	TRANSLATE( "TRANSLATE" , true ),
	TRANSLATION( "TRANSLATION" , true ),
	TRIM( "TRIM" , true ),
	TRUE( "TRUE" , true ),
	UNION( "UNION" , true ),
	UNIQUE( "UNIQUE" , true ),
	UNKNOWN( "UNKNOWN" , true ),
	UPDATE( "UPDATE" , true ),
	UPPER( "UPPER" , true ),
	USAGE( "USAGE" , true ),
	USER( "USER" , true ),
	USING( "USING" , true ),
	VALUE( "VALUE" , true ),
	VALUES( "VALUES" , true ),
	VARCHAR( "VARCHAR" , true ),
	VARYING( "VARYING" , true ),
	VIEW( "VIEW" , true ),
	WHEN( "WHEN" , true ),
	WHENEVER( "WHENEVER" , true ),
	WHERE( "WHERE" , true ),
	WITH( "WITH" , true ),
	WORK( "WORK" , true ),
	WRITE( "WRITE" , true ),
	YEAR( "YEAR" , true ),
	ZONE( "ZONE" , true ),
	IF ( "IF" , true ),
	INDEX ( "INDEX" , true ),
	DATABASE ( "DATABASE" , true ),

	
	COMMENT( "COMMENT" , true ),
	
	/** 注释 */
	OPERATION_COMMENT ( "--" , true ),
	
	/** 下滑线 */
	OPERATION_UNDERSCORE( "_" , false ),
	
	
	
	/** 点号 */
	OPERATION_PERIOD ( "." , false ),
	
	/**  结束符*/
	OPERATION_SEMICOLON ( ";" , false ),
	
	/** 空格 */
	OPERATION_SPACE ( " " , false ),

	/** ,  */
	OPERATION_COMMA ( "," , true ),
	
	/** ( */
	OPERATION_PAREN_LEFT("(", false),

	/** ) */
	OPERATION_PAREN_RIGHT(")", false), 
	
	OPERATION_SINGLE_QUOTES("'", false), 
	
	OPERATION_ASTERISK("*", true), 

	OPERATION_EQUALS("=", true), 

	;
	
	private final String value;
	
	private final boolean space;

	private SqlKeyWord(String value, boolean space) {
		this.value = value;
		this.space = space;
	}

	public String getValue() {
		return this.value;
	}

	@Override
	public String toString() {

		return value + (space ? OPERATION_SPACE : "");
	}
}
